/**
 *
 */
package com.guchenbo.example.encoding;

import java.io.UnsupportedEncodingException;

/**
 * @author Cre.Gu
 *
 */
public class TestGbk {
	public static void main(String[] args) throws UnsupportedEncodingException, Exception {
		TestGbk t = new TestGbk();

		System.out.println(Integer.toBinaryString(39038));
		System.out.println(Integer.toBinaryString(-128&0xff));
		System.out.println(Integer.toBinaryString(-1));

		String s = "?";
		byte[] bs = s.getBytes();

		for (int i = 0; i < bs.length; i++) {
			System.out.println(bs[i]);
		}

		Character c = '?';
		System.out.println(Integer.toHexString(c));

		long l = 0x987el;
		long l2 = 0xffffl;

		System.out.println(l < l2);

		System.out.println(Integer.toHexString((int) '?'));
		System.out.println(Integer.toHexString((int) '0'));
		System.out.println(Integer.toHexString((int) 'A'));
		System.out.println(Integer.toHexString((int) '?'));
		System.out.println(Integer.toHexString((int) '?'));
		System.out.println("\u0001d306");

		System.out.println(Utf8Utils.utf84UnicodeHex('?'));
		System.out.println(Utf8Utils.utf84UnicodeHex('?'));

		// t.utf84Unicode(String.valueOf('?'));
		char c1 = '?';
		System.out.println(c1);
		System.out.println('顾');
	}

}
